/*
Use ATC-3 to copay elasticity mapping
*/


// global db "C:\Users\u6025615\Dropbox"
// global datadir "${db}\Pharmaceutical Mergers\Replication folder"

use "${outdir}\overlap_pair_list.dta", clear

merge m:1 dealID using "${maindir}\acquisition_characteristics.dta", ///
	keep(match) nogen

keep if stlth == 1 & valeant == 0

keep atc3
duplicates drop

// atc3_level_copay_elasticities (atc3, elasticity)
merge 1:1 atc3 using "${outdir}\atc3_level_copay_elasticities.dta", keep(2 3)
gen overlap_market = (_merge == 3)
drop _merge

tab overlap_market
summ elasticity, detail
eststo: reg elasticity overlap_market, r
 
esttab using "${paperdir}\Tables\Table OA3.csv", ///
		con ar2 se label replace nostar keep(overlap_market)
eststo clear	
